// DocumentAccessPermissionEnum 文档访问权限
const PUBLIC = {
  code: '00',
  text: '任何人',
  name: 'PUBLIC',
  type: ''
}
const ACCESS_TEAM_ONLY = {
  code: '10',
  text: '仅团队',
  name: 'TEAM_ONLY',
  type: ''
}
const DocumentAccessPermissionEnum = {
  '00': PUBLIC,
  '10': ACCESS_TEAM_ONLY,
  'PUBLIC': PUBLIC,
  'TEAM_ONLY': ACCESS_TEAM_ONLY
}
// DocumentEditPermissionEnum 文档编辑权限
const CREATOR_ONLY = {
  code: '00',
  text: '仅创建者',
  name: 'CREATOR_ONLY',
  type: ''
}
const EDIT_TEAM_ONLY = {
  code: '10',
  text: '仅团队成员',
  name: 'TEAM_ONLY',
  type: ''
}
const CREATOR_AND_PROJECT_MANAGER = {
  code: '20',
  text: '仅创建者及团队管理员',
  name: 'CREATOR_AND_PROJECT_MANAGER',
  type: ''
}
const DocumentEditPermissionEnum = {
  '00': CREATOR_ONLY,
  '10': EDIT_TEAM_ONLY,
  '20': CREATOR_AND_PROJECT_MANAGER,
  'CREATOR_ONLY': CREATOR_ONLY,
  'TEAM_ONLY': EDIT_TEAM_ONLY,
  'CREATOR_AND_PROJECT_MANAGER': CREATOR_AND_PROJECT_MANAGER
}
export default {
  DocumentAccessPermissionEnum,
  DocumentAccessPermissions: [PUBLIC, ACCESS_TEAM_ONLY],
  DocumentEditPermissionEnum,
  DocumentEditPermissions: [CREATOR_ONLY, EDIT_TEAM_ONLY, CREATOR_AND_PROJECT_MANAGER]
}
